﻿@model Forest.Cat.Web.Models.Catalog.JobPositionModel
@using Forest.Web.Framework
@using Forest.Cat.Domain.Shared
@{
    ViewBag.Title = Model.JobTitle + " | " + Model.CompanyModel.CompanyName;
    Layout = "~/Views/Shared/_Root.cshtml";
}
<script type="text/javascript">
    function addSavedJob() {
        $.ajax({
            url: '@Url.Action("GetTemplateContent")',
            type: "POST",
            data: 'id=' + $(this).val(),
            success: function (text) {
                $("#coverLetter").val(text);
            }
        });
    }
</script>
<div class="main_result">
    所有职位 &gt; <b>@Model.JobTitle</b></div>
<div class="jobview_content">
    <div class="jobview_content_left">
        <div class="jobview_name">
            @if (Model.EndDate.Value.Date < DateTime.Now.Date)
            { 
                <span style="color: Red; font-weight: bold; font-size: 20px; float: right; padding-right: 50px">
                    职位已过期</span>
                <br />
            }
            <h3>
                @Model.JobTitle</h3>
            @if (Model.EndDate.Value.Date >= DateTime.Now.Date && Model.Status == (int)Status.Publish)
            {
                if (!Model.IsApplied)
                {
                <a onclick="return checkLogin();" href="@Url.Action("Apply", "JobApplication", new { id = Model.Id })">
                    <img src="/Themes/DarkOrange/Content/images/img-jobview_applyBtn-89-27.jpg" />
                </a>
                }
                else
                { 
                <a href="#">已申请</a>
                }
            }
            <div class="cl">
            </div>
        </div>
        <div class="jobview_messages">
            @if (!string.IsNullOrWhiteSpace(Model.Responsibilities))
            {
                <h4>
                    岗位职责：</h4>
                <p>@Html.Raw(Forest.Core.Html.HtmlHelper.ConvertPlainTextToHtml(Model.Responsibilities))</p>
            }
            @if (!string.IsNullOrWhiteSpace(Model.Qualifications))
            {
                <h4>
                    任职要求：</h4>
                <p>@Html.Raw(Forest.Core.Html.HtmlHelper.ConvertPlainTextToHtml(Model.Qualifications))</p>
            }
            @if (!string.IsNullOrWhiteSpace(Model.Welfare))
            {
                <h4>
                    福利待遇：</h4>
                <p>@Html.Raw(Forest.Core.Html.HtmlHelper.ConvertPlainTextToHtml(Model.Welfare))</p>
            }
            <p class="applyBtn">
                @if (Model.EndDate >= DateTime.Now.Date && Model.Status == (int)Status.Publish)
                {
                    if (!Model.IsApplied)
                    {
                    <a onclick="return checkLogin();" href="@Url.Action("Apply", "JobApplication", new { id = Model.Id })">
                        <img src="/Themes/DarkOrange/Content/images/img-jobview_applyBtn-89-27.jpg" />
                    </a>
                    }
                    else
                    { 
                    <a href="#">已申请</a>
                    }
                }
                @Html.Action("SavedJobView", "JobHunting", new { id = Model.Id })
                <!-- Baidu Button BEGIN -->
                <div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare">
                    <span class="bds_more">分享到：</span> <a class="bds_tsina"></a><a class="bds_qzone">
                    </a><a class="bds_linkedin"></a><a class="bds_fbook"></a><a class="bds_tqq"></a>
                    <a class="bds_t163"></a><a class="shareCount"></a>
                </div>
                <script type="text/javascript" id="bdshare_js" data="type=tools&amp;uid=6742235"></script>
                <script type="text/javascript" id="bdshell_js"></script>
                <script type="text/javascript">
                    document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date() / 3600000)
                </script>
                <!-- Baidu Button END -->
            </p>
        </div>
    </div>
    <div class="jobview_content_right">
        <div class="company_infor">
            <div class="company_logo">
                @if (Model.CompanyModel.CompanyLogoId.HasValue)
                { 
                    <a href="@Url.Action("CompanyView", "Company", new { Id = Model.CompanyModel.Id })">
                        <img width="160px" height="90px" src="@Url.Action("GetImage", "Company", new { Id = Model.CompanyModel.CompanyLogoId })" />
                    </a>
                }
            </div>
            <h3>
                @Model.CompanyModel.CompanyName</h3>
            <p>
                @Html.Raw(Model.CompanyModel.Address)，@Model.CompanyModel.PostalCode</p>
            <p>
                @Html.ActionLink("公司介绍", "CompanyView", "Company", new { id = Model.CompanyModel.Id }, null)
            </p>
            <p>
                @Html.ActionLink("更多公司职位", "SearchJobList", "Catalog", new { companyName = Model.CompanyModel.CompanyName }, null)
            </p>
        </div>
        <div class="public_date">
            <p>
                <b>发布日期：</b>@Model.Reposted.Value.ToString("yyyy-MM-dd")</p>
            <p>
                <b>工作地点：</b>@Model.CityName</p>
            <p>
                <b>招聘人数：</b>
                @{
                    if (Model.Wants == 0)
                    {
                    @Html.Raw("若干");
                    }
                    else
                    {
                    @Html.Raw(Model.Wants.ToString());
                    }
                }
                人</p>
            @if (!String.IsNullOrWhiteSpace(Model.YearsOfExperienceName))
            {
                <p>
                    <b>工作年限：</b>@Html.FormatDisplayText(Model.YearsOfExperienceName)
                </p>
            }
            @if (!String.IsNullOrWhiteSpace(Model.EducationLevelName))
            {
                <p>
                    <b>学历要求：</b>@Model.EducationLevelName</p>
            }
            @if (!String.IsNullOrWhiteSpace(Model.SalaryRangeName) && Model.IsOpenSalaryRange)
            {
                <p>
                    <b>月薪范围：</b>@Model.SalaryRangeName</p>
            }
            else
            {
                <p>
                    <b>月薪范围：</b>@Html.Raw("面议")</p>
            }
            @if (!String.IsNullOrWhiteSpace(Model.JobTypeName))
            {
                <p>
                    <b>职位类型：</b>@Model.JobTypeName</p>
            }
        </div>
        <div class="public_date">
            @if (!String.IsNullOrWhiteSpace(Model.Contact))
            {
                <p>
                    <b>联 系 人 ：</b>@Model.Contact</p>
            }
            @if (!String.IsNullOrWhiteSpace(Model.Email))
            {
                <p>
                    <b>电子邮件：</b> <a href="mailto:@Model.Email">@Model.Email</a>
                </p>
            }
@*@if (!String.IsNullOrWhiteSpace(Model.Tel))
            {
                <p>
                    <b>电 话 ：</b>@Model.Tel</p>
            }
            @if (!String.IsNullOrWhiteSpace(Model.Fax))
            {
                <p>
                    <b>传 真 ：</b>@Model.Fax</p>
            }*@
        </div>
    </div>
    <div class="cr">
    </div>
</div>
